Logic Programming in Tabular Allegories

نویسندگان

  • Emilio Jesús Gallego Arias
  • James Lipton
چکیده

We develop a new compilation scheme and categorical abstract machine for execution of logic programs based on allegories, the categorical version of the calculus of relations. In our case, both operational and denotational semantics are built upon the same theory, thus execution of a query is performed using algebraic reasoning, giving immediate proof of correctness properties. Our work serves two purposes: having an efficient and formal model of a logic programming compiler and machine and building the base for incorporating features typical of functional programming in a declarative way, while maintaining 100% compatibility with existing Prolog programs. The starting point is the construction of a Regular Lawvere Category from the program’s signature Σ. Then, the resulting Σ-allegory captures all the needed theory and meta-theory for Prolog. The categorical framework for reasoning and execution is based on relation composition, thus allowing the enrichment of the base category with types, functions and other constructions typical of functional programming languages. The single primitive of relation composition encompasses unification, garbage collection, parameter passing, environment creation and destruction. Composition happens between relations tabulated by a pair of maps, whose domain represents the global storage in use while its co-domain represents the number of temporary registers in use. This execution mechanism is efficient, given that shared state is faithfully represented by the notion of projections, corresponding to pointers in the implementation.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Groups in Allegories

Groups are one of the most fundamental notions in mathematics. This paper provides a foundation of group theory in allegories. Almost all results in the paper can be applied to theory of fuzzy groups.

متن کامل

Modalities for an Allegorical Conceptual Data Model

Allegories are enriched categories generalizing a category of sets and binary relations. In this paper, we extend a new, recently-introduced conceptual data model based on allegories by adding support for modal operators and developing a modal interpretation of the model in any allegory satisfying certain additional (but natural) axioms. The possibility of using different allegories allows us t...

متن کامل

A First-Order Calculus for Allegories

In this paper we a language and first-order calculus for formal reasoning about relations based on the theory of allegories. Since allegories are categories the language is typed in Church-style. We show soundness and completeness of the calculus and demonstrate its usability by presenting the RelAPS system; a proof assistant for relational categories based on the calculus presented here.

متن کامل

Information Flow in Tabular Interpretations for Generalized Push-Down Automata

This paper presents a general framework for deriving tabular algorithms for a very large class of stack-based computations, not only in context-free parsing but in logic programming as well and more generally for all kinds of \information" domains (abstract domains, constraint domains). Tabular algorithms store traces of computations in a table to achieve computation sharing, which is most usef...

متن کامل

Granular Logic with Variables for Implementation of Extended Tabular Trees

This paper presents proposals of certain extensions to the XTT knowledge representation model, a method of tabular specification for rule-based systems. The extensions concern introduction of variables, functionally dependent attributes, constraints, fuzzy rules and time-delayed values.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2012